#include <stdio.h>

#define BUFFENONE 0x1  //无缓冲
#define BUFFELINE 0x2  //行缓冲
#define BUFFEALL 0x4   //全缓冲

typedef struct __My_FILE
{
  char outputbuffer[128];//缓冲区
  int flag;//缓存区刷新方式
  int fd;//文件描述符
  int current;//记录缓冲内容的最后一个下标

}My_FILE;


My_FILE* myfopen(const char *path, const char *mode);

int myfclose(My_FILE* fp);

size_t myfwrite(const void *ptr, size_t size, size_t nmemb, My_FILE *stream);
